package main

import (
	"flag"
	"fmt"
	"goRss/appconfig"
	"goRss/module/source"
	"goRss/module/web"
)

func testA9() {
	var api source.Api = source.A9vg{}
	data, err := api.FetchNews("http://bbs.a9vg.com/forum-610-1.html")
	if err != nil {
		fmt.Println(data)
	} else {
		fmt.Println(data)
	}

}

func testTieba() {
	var api source.Api = source.Tieba{}
	data, err := api.FetchNews("https://tieba.baidu.com/f?kw=xboxone")
	if err != nil {
		fmt.Println(data)
	} else {
		fmt.Println(data)
	}

}
func main() {
	configFile := flag.String("config", "config/config.json", "config file name")
	flag.Parse()
	appconfig.Init(*configFile)
	fmt.Println(appconfig.AppConfig)
	web.Start()
	// testA9()
}
